#!/bin/bash
#========================================================================
# Author: YSLin
# Email: 
# File Name: process.sh
# Description: 
#   
# Edit History: 
#   2010-12-21    File created.
#========================================================================
#shell script不會顯現,要再一般模式下執行
#disable the monitoring messages
set +o monitor
ls &
read 
#enable messages are part of process or job monitoring
set -o monitor
ls &
#[1]+  Done                    ls --color=auto
read 
#You can also check all the shell options with the following
set -o
ls &

#You can determine which key performs which function by using the stty command. By entering
stty -a
#you are shown the following, along with a lot of other information:
#intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ^@
#eol2 = ^@; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; reprint = ^R
#discard = ^O; werase = ^W; lnext = ^V

#bg %n
#fg %n
#The nohup command prevents your process from getting the HUP (Hang UP) signal and enables it to continue processing
#nohup 可以讓你在離線或登出系統後，還能夠讓工作繼續進行
nohup ls &
#[1] 6695
#$ Sending output to nohup.out
#[1] + Done nohup ls &

#wait until job number n finish
#wait %n

#list running process
#jobs

#kill job number n
#kill %n

#Overlaying the Current Process ( exec Command)
exec csh
ps -f
